#ifndef __RISCV_H__
#define __RISCV_H__
#include <encoding.h>

#define CACHE_EN                5
#define ADDR_TYPE_OFF           0x0
#define ADDR_TYPE_TOR           0x1
#define ADDR_TYPE_NA4           0x2
#define ADDR_TYPE_NAPOT         0x3
#define ADDR_TYPE               3
#define WRITE_EN                2
#define READ_EN                 1
#define EXECUTE_EN              0

#define MSTATUS         (0x300)
#define MIE             (0x304)
#define MTVEC           (0x305)
#define MEPC            (0x341)
#define MCAUSE          (0x342)
#define MTVAL           (0x343)
#define MIP             (0x344)
#define MCYCLE          (0xB00)
#define MCYCLE_H        (0xB80)

#define PCER 0x7a0
#define PCCR 0x780

#endif
